package chixing.day19.pcp_demo;

public class Consume extends Thread{
    private PublicResource publicResource;

    public Consume(PublicResource publicResource) {
        this.publicResource = publicResource;
    }

    @Override
    public void run() {
        while (true){
            publicResource.consume();
        }
    }
}
